package ws

type ExchangeListRequest struct {
	Page 			int 		`json:"page"`
	Sort 			string 		`json:"sort"`			// amount
	Direction 		string 		`json:"direction"`		// "asc" "desc"
}

type ExchangeListResponse struct {
	Slug 			string 		`json:"slug"`
	NameCn 			string 		`json:"name_cn"`
	NameEn 			string 		`json:"name_en"`
	Logo 			string 		`json:"logo"`
	AmountUsd 		string 		`json:"amount_usd"`
	AmountCny 		string 		`json:"amount_cny"`
	NumCoins 		int 		`json:"num_coins"`
	NumPairs 		int 		`json:"num_pairs"`
	NumMarkets 		int 		`json:"num_markets"`
}

// 请求交易对列表
type ExchangePairListRequest struct {
	Exchange 		string 		`json:"exchange"`	// 交易所名称
	Page 			int 		`json:"page"`
	Sort 			string 		`json:"sort"`		// "amount", "price", "percent"
	Direction 		string 		`json:"direction"`	// "asc", "desc"
}

type ExchangePairListResponse struct {
	Meta 	struct{
		NameCn 			string 			`json:"name_cn"`
		NameEn 			string 			`json:"name_en"`
		Logo 			string 			`json:"logo"`
	}									`json:"meta"`
	Data 	[]*ExchangeCoinPair 		`json:"data"`
	Total 				int 			`json:"total"`
	Page 				int 			`json:"page"`
	PageSize 			int 			`json:"page_size"`
}

// -------------------------------
type PairDetailSummaryRequest struct {
	From 			string 		`json:"from"`
	To 				string 		`json:"to"`
	Exchange 		string 		`json:"exchange"`
}

type PairDetailKlineRequest struct {
	From 		string 		`json:"from"`
	To 			string 		`json:"to"`
	Exchange 	string 		`json:"exchange"`
	Interval 	string 		`json:"interval"`
	Length 		int 		`json:"length"`
}

type PairDetailDepthRequest struct {
	From 		string 		`json:"from"`
	To 			string 		`json:"to"`
	Exchange 	string 		`json:"exchange"`
	Length 		int 		`json:"length"`
}

type PairDetailSummaryResponse struct {
	From 			string 		`json:"from"`
	To 				string 		`json:"to"`
	Symbol 			string 		`json:"symbol"`
	Volume24h  		string 		`json:"volume_24h"`
	Amount24h 		string 		`json:"amount_24h"`
	Amount24hUsd 	string 		`json:"amount_24h_usd"`
	Amount24hCny 	string 		`json:"amount_24h_cny"`
	Open24h 		string 		`json:"open_24h"`
	Open24hUsd 		string 		`json:"open_24h_usd"`
	Open24hCny 		string 		`json:"open_24h_cny"`
	High24h			string 		`json:"high_24h"`
	High24hUsd 		string 		`json:"high_24h_usd"`
	High24hCny 		string 		`json:"high_24h_cny"`
	Low24h 			string 		`json:"low_24h"`
	Low24hUsd 		string 		`json:"low_24h_usd"`
	Low24hCny 		string 		`json:"low_24h_cny"`
	Close24h 		string 		`json:"close_24h"`
	Close24hUsd 	string 		`json:"close_24h_usd"`
	Close24hCny 	string 		`json:"close_24h_cny"`
	Percent 		string		`json:"percent"`
}

// ---------------------------------